package com.bai.qf2201.service.Impl;

import com.bai.qf2201.mapper.orderMapper;
import com.bai.qf2201.po.Orders;
import com.bai.qf2201.service.orderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class orderServiceImpl implements orderService {
    @Autowired
    private orderMapper om;
    @Override
    public List<Orders> findAll() {
        List<Orders> all = om.findAll();
        return all;
    }

    @Override
    public Orders findOneById(int id) {
        return null;
    }

    @Override
    public int addOne(Orders orders) {
        int i = om.addOne(orders);
        return i;
    }

    @Override
    public List<Orders> findByUid(int uid) {
        List<Orders> ordersByUid = om.findByUid(uid);
        return ordersByUid;
    }

    @Override
    public int delOne(int id) {

        int i = om.delOne(id);
        return i;
    }

    @Override
    public int updateOne(Orders orders) {
        return 0;
    }
}
